package cn.exrick.xboot.base.entity

import cn.exrick.xboot.core.base.XbootBaseEntityKt
import cn.exrick.xboot.core.common.utils.SnowFlakeUtil
import com.baomidou.mybatisplus.annotation.TableId
import com.baomidou.mybatisplus.annotation.TableName
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import io.swagger.annotations.Extension
import lombok.Data
import org.hibernate.annotations.DynamicInsert
import org.hibernate.annotations.DynamicUpdate
import java.util.*
import javax.persistence.Entity
import javax.persistence.Id
import javax.persistence.Table

/**
 * @author Fei
 */
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "en_enterprise_employee")
@TableName("en_enterprise_employee")
@ApiModel(value = "企业员工")
data class EnterpriseEmployee(


        @ApiModelProperty("用户id")
        var userId: String? = "",

        @ApiModelProperty("序号")
        var sort: Int? = 0,

        @ApiModelProperty("企业id")
        var enterpriseId: String? = "",

        @ApiModelProperty("区域id")
        var areaId: String? = null,

        @ApiModelProperty("岗位")
        var jobId: String? = "",

        @ApiModelProperty("自拍照")
        var selfPic: String? = "",

        @ApiModelProperty("生活照")
        var lifePic: String? = "",

        @ApiModelProperty("全家福")
        var familyPic: String? = "",

        @ApiModelProperty("影响我的人员[逗号拼接]")
        var affectedMePerson: String? = null,

        @ApiModelProperty("我影响的人员[逗号拼接]")
        var meAffectedPerson: String? = null,

        @ApiModelProperty("我的安全师傅[逗号拼接]")
        var mySafeMasterPerson: String? = null,

        @ApiModelProperty("我的安全徒弟[逗号拼接]")
        var mySafePrentice: String? = null,

        @ApiModelProperty("是否能够直接离岗")
        var dimission: Boolean? = false,

        @ApiModelProperty("安全得分")
        var safeScore: Int? = 100
): XbootBaseEntityKt() {

    @Id
    @TableId
    override var id: String = SnowFlakeUtil.nextId().toString()

    companion object{
        private const val serialVersionUID = 1L
    }
}